<!DOCTYPE html>
<html>
  <head>
    <title>Custom Elements</title>
  </head>
  <body>
    <cy-custom-element></cy-custom-element>

    <script type="text/javascript">
      // define empty functions to stub in tests
      window.customElementConstructor = function () {}
      window.customElementAttributeChanged = function () {}

      if (window.customElements) {
        window.customElements.define('cy-custom-element', class extends HTMLElement {
          constructor () {
            super()

            window.customElementConstructor()
          }

          attributeChangedCallback () {
            window.customElementAttributeChanged()
          }
        })
      }
    </script>
  </body>
</html>
